<?php

/**
 * Description of item_model
 *
 * @author Life Hazard
 */
class Kas_Operasional_Model extends Default_My_Model{
    
    public function __construct() {
        parent::__construct();
    }
    
    function item_list(){
        return $this->db->query("SELECT sjko.id_sjko,jko.nama_jko, sjko.nama_sjko FROM jenis_kas_operasional jko join sub_jenis_kas_operasional sjko on jko.id_jko = sjko.id_jko ORDER BY jko.nama_jko, sjko.nama_sjko");
    }
    
    function count_item_list(){
        return $this->get_scalar("SELECT COUNT(id_sjko) as total FROM jenis_kas_operasional jko join sub_jenis_kas_operasional sjko on jko.id_jko = sjko.id_jko ", "total");
    }
    
}

?>
